package com.restaurant.springboot.controller;


import com.restaurant.springboot.repositories.PaymentRepository;
import com.restaurant.springboot.service.impl.PaymentServiceImpl;
import com.restaurant.springboot.utils.RespCode;
import com.restaurant.springboot.utils.RespEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author jack
 * @Date:2019/7/29 14:15
 */
@RestController
@RequestMapping("/api/payment")
public class PaymentController {

    @Autowired
    PaymentServiceImpl paymentService;
    @GetMapping("")
    public RespEntity addPaymentRecord(){
        return new RespEntity(
                RespCode.SUCCESS,
                paymentService.getPaymentById(3)
        );
    }
}
